package com.hqyj.mana.service.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import com.hqyj.mana.dao.BasicInformationMapper;
import com.hqyj.mana.pojo.BasicInformation;
import com.hqyj.mana.service.BasicInfoService;

@Service
public  class BasicInfoImpl implements BasicInfoService {

	
	@Autowired
	BasicInformationMapper mapper;
	
	@Override
	public List<BasicInformation> selectAllBasicInfo(String userId) {
		// TODO Auto-generated method stub
		List<BasicInformation> list = mapper.selectAllBasicInfo(userId);
		return list;
	} 
	
	@Override
	public boolean add(BasicInformation user) {
		if(mapper.insertSelective(user)>0){
			return true;
		}
		return false;
	}

	@Override
	public boolean update(@RequestBody BasicInformation user) {
		if(mapper.updateByPrimaryKeySelective(user)>0){
			return true;
		}
		return false;
	}

	@Override
	public boolean del(Integer id) {
		if(mapper.deleteByPrimaryKey(id)>0){
			return false;
		}
		return true;
	}



	@Override
	public HashMap<String, Object> selectBasicInformationByCondtion(BasicInformation user) {
		// TODO Auto-generated method stub
		return null;
	}
	}


